package Lab02.test26;

import java.util.Scanner;

public class ExceptionTest {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入除数:");
        int tb1 = input.nextInt();
        System.out.println("请输入被除数:");
        int tb2 = input.nextInt();
        int result = 0;
        try {
            result = tb1 / tb2;
        }
        catch (ArithmeticException e) {
            e.printStackTrace();
        } finally {
            System.out.println("异常处理");
        }
        System.out.println("result");
    }
}
